﻿package DevilCat {
	
	import flash.display.MovieClip;
	import fl.transitions.Tween;
	import fl.transitions.easing.*;
	import fl.transitions.TweenEvent; 
	import DevilCat.BlankButtonObject;
	
	
	public class NPCSell extends MovieClip {
		public var tweenList:Array = new Array();
		
		//public function NPCSell(XMLData:XMLList) {
		public function NPCSell() {
			var xmm:XML=
			<litem>
				<it>
				  <Code>HP100</Code>
				  <NumberOf>1</NumberOf>
				</it>
				<it>
				  <Code>HP1000</Code>
				  <NumberOf>1</NumberOf>
				</it>
			  </litem>
			var itemLeng:Number=xmm.it.length();
			for(var i:int=0;i<itemLeng;i++){
				var newButton:ItemObject =SQLData.GetItemFromXML(xmm.it[i]);
				newButton.y=0-i*24;
				newButton.AddEventBuyItem();
				ItemPanel.addChild(newButton);
			}
			x=200;
		}
		public function addMe(){
			tweenList.unshift(new Tween (this,"alpha",Strong.easeOut,0,1,2,true));
			tweenList.unshift(new Tween (this,"y",Strong.easeOut,this.y-50,this.y,2,true));
		}
	}
}
